package com.beemans.common.app.ui.activities

import android.content.Intent
import android.os.Bundle
import com.beemans.common.app.R
import com.beemans.common.app.ui.base.BaseActivity
import com.beemans.common.ext.jumpActivity
import com.tiamosu.databinding.page.DataBindingConfig

/**
 * @author tiamosu
 * @date 2021/3/18.
 */
class SplashActivity : BaseActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        setTheme(R.style.CommonAppTheme)
        super.onCreate(savedInstanceState)
    }

    override fun getDataBindingConfig(): DataBindingConfig {
        return DataBindingConfig(0)
    }

    override fun isLaunchPage() = true

    override fun initEvent() {
        jumpActivity {
            startActivity(Intent(this, MainActivity::class.java))
            finish()
        }
    }

    override fun doBusiness() {
    }

    //拦截返回退出应用
    override fun onBackPressedSupport() {
    }
}